package com.beerandjesus.sportofkings.handicapper.model;

import com.beerandjesus.sportofkings.handicapper.profile.AnalysisProfile;

import java.util.List;

/**
 * Top level interface for the analysis result for a single hores in a race
 * Date: Jul 14, 2012
 * Time: 9:25:06 AM
 */
public interface HorseAnalysisResult {

    /**
     * Get the post position identifier for this horse.
     * @return The post position
     */
    int getPostPosition();

    /**
     * Get the morning line odds. Null if unavailable.
     * @return The morning line, or null
     */
    MixedNumeral getMorningLine();

    /**
     * Get the horse's name.
     * @return The name
     */
    String getName();

    /**
     * Get all anaysis profiles applicable to this runner.
     * @return The list of profiles. Can be empty or null.
     *
     */
    List<AnalysisProfile> getProfiles();

    /**
     * Get the best representative overall speed rating from previous
     * races run by this horse.
     * NOTES:<br /><ul>
     * <li> A minus sign (-) can appear for
     * older maidens, indicating higher speed figures a few races previous
     * followed by more recent poorer speed performances.<br />
     * <li> An asterisk can appear for second time starters, indicating
     * an applied bonus of 15 points. This should be noted in non-claiming
     * maiden races only.
     * <li> A double asterisk can appear for second time starters, indicating
     * an applied bonus of 30 points. This should be noted in non-claiming
     * maiden races only.
     * <li> Figure is null for first time starters.
     * </ul>
     * @return The (sometimes adjusted) speed figure, or null
     */
    String getSpeedFigure();

    /**
     * Get the list of fast workouts for this runner leading up to the
     * current race.
     * @return The workouts. Can be an empty list or null if there are
     *          no fast workouts.
     */
    List<String> getFastWorkouts();

    /**
     * Add this runner to a results table.
     * @param table Cannot be null
     */
    void addToTable(ResultsTable table);

    /**
     * Get the category describing this horse in this race.
     * @return The result type
     */
    ResultType getResultType();

    /**
     * Get the count of recent races where this horse achieved a speed
     * figure that equals or exceeds the speed par for the current race.
     * @return The speed count
     */
    int getParSpeedCount();
}
